<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/vue.min.js"></script>
</head>

<body>
    <div id="app">
        <input type="button" value="礼物刷起来" @click="showTime(666,'爱你老铁')" />

        <input type="text" @keyup.esc="hi" />
    </div>

</body>
<script>
    var VM = new Vue({
        el: '#app',
        data: {},
        methods: {
            showTime: function(p1, p2) {
                console.log(p1, p2);
            },
            hi: function() {
                alert("你好");
            }
        }
    })
</script>

</html>